<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="pandoc" />


<meta name="author" content="Yiying Wang" />

<meta name="date" content="2017-03-15" />

<title>Widget 01 - Axis</title>

<script src="libs/jquery-1.11.3/jquery.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="libs/bootstrap-3.3.5/css/cosmo.min.css" rel="stylesheet" />
<script src="libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<script src="libs/navigation-1.1/tabsets.js"></script>
<script src="libs/htmlwidgets-0.8/htmlwidgets.js"></script>
<script src="libs/echarts-2.2.7/echarts-all.js"></script>
<script src="libs/charts-ext-2.2.7/main.js"></script>
<script src="libs/charts-ext-2.2.7/BMap.js"></script>
<script src="libs/echarts-binding-0.2/echarts.js"></script>


<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
div.sourceCode { overflow-x: auto; }
table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
  margin: 0; padding: 0; vertical-align: baseline; border: none; }
table.sourceCode { width: 100%; line-height: 100%; }
td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
td.sourceCode { padding-left: 5px; }
code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
code > span.dt { color: #902000; } /* DataType */
code > span.dv { color: #40a070; } /* DecVal */
code > span.bn { color: #40a070; } /* BaseN */
code > span.fl { color: #40a070; } /* Float */
code > span.ch { color: #4070a0; } /* Char */
code > span.st { color: #4070a0; } /* String */
code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
code > span.ot { color: #007020; } /* Other */
code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
code > span.fu { color: #06287e; } /* Function */
code > span.er { color: #ff0000; font-weight: bold; } /* Error */
code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
code > span.cn { color: #880000; } /* Constant */
code > span.sc { color: #4070a0; } /* SpecialChar */
code > span.vs { color: #4070a0; } /* VerbatimString */
code > span.ss { color: #bb6688; } /* SpecialString */
code > span.im { } /* Import */
code > span.va { color: #19177c; } /* Variable */
code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
code > span.op { color: #666666; } /* Operator */
code > span.bu { } /* BuiltIn */
code > span.ex { } /* Extension */
code > span.pp { color: #bc7a00; } /* Preprocessor */
code > span.at { color: #7d9029; } /* Attribute */
code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
</style>
<style type="text/css">
  pre:not([class]) {
    background-color: white;
  }
</style>


<style type="text/css">
h1 {
  font-size: 34px;
}
h1.title {
  font-size: 38px;
}
h2 {
  font-size: 30px;
}
h3 {
  font-size: 24px;
}
h4 {
  font-size: 18px;
}
h5 {
  font-size: 16px;
}
h6 {
  font-size: 12px;
}
.table th:not([align]) {
  text-align: left;
}
</style>

<link rel="stylesheet" href="/home/madlogos/R/x86_64-pc-linux-gnu-library/3.3/knitr/misc/vignette.css" type="text/css" />

</head>

<body>

<style type = "text/css">
.main-container {
  max-width: 940px;
  margin-left: auto;
  margin-right: auto;
}
code {
  color: inherit;
  background-color: rgba(0, 0, 0, 0.04);
}
img {
  max-width:100%;
  height: auto;
}
.tabbed-pane {
  padding-top: 12px;
}
button.code-folding-btn:focus {
  outline: none;
}
</style>



<div class="container-fluid main-container">

<!-- tabsets -->
<script>
$(document).ready(function () {
  window.buildTabsets("TOC");
});
</script>

<!-- code folding -->






<div class="fluid-row" id="header">



<h1 class="title toc-ignore">Widget 01 - Axis</h1>
<h4 class="author"><em>Yiying Wang</em></h4>
<h4 class="date"><em>2017-03-15</em></h4>

</div>

<div id="TOC">
<ul>
<li><a href="#introduction"><span class="toc-section-number">1</span> Introduction</a></li>
<li><a href="#function-call"><span class="toc-section-number">2</span> Function Call</a></li>
<li><a href="#showcase"><span class="toc-section-number">3</span> Showcase</a><ul>
<li><a href="#data-preparation"><span class="toc-section-number">3.1</span> Data Preparation</a></li>
<li><a href="#modification"><span class="toc-section-number">3.2</span> Modification</a></li>
</ul></li>
<li><a href="#references"><span class="toc-section-number">4</span> References</a></li>
</ul>
</div>

<p>First, you should load <code>recharts</code>:</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">library</span>(recharts)</code></pre></div>
<div id="introduction" class="section level1">
<h1><span class="header-section-number">1</span> Introduction</h1>
<p>Line, bar, scatter, k and eventRiver charts are based on Cartesian Coordinate System, which calls for x-axis and y-axis. When you generate an Echarts object under Cartesian Coordiante System using <code>echartr</code>, you can then modify the axes by <code>setAxis</code>. The work functions of this family are <code>setXAxis</code>, <code>setYAxis</code>, <code>setX1Axis</code>, <code>setY1Axis</code>.</p>
</div>
<div id="function-call" class="section level1">
<h1><span class="header-section-number">2</span> Function Call</h1>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">setAxis</span>(chart, <span class="dt">series =</span> <span class="ot">NULL</span>, <span class="dt">which =</span> <span class="kw">c</span>(<span class="st">&quot;x&quot;</span>, <span class="st">&quot;y&quot;</span>, <span class="st">&quot;x1&quot;</span>, <span class="st">&quot;y1&quot;</span>),
  <span class="dt">type =</span> <span class="kw">c</span>(<span class="st">&quot;value&quot;</span>, <span class="st">&quot;category&quot;</span>, <span class="st">&quot;time&quot;</span>, <span class="st">&quot;log&quot;</span>), <span class="dt">show =</span> <span class="ot">TRUE</span>,
  <span class="dt">position =</span> <span class="kw">c</span>(<span class="st">&quot;bottom&quot;</span>, <span class="st">&quot;top&quot;</span>, <span class="st">&quot;left&quot;</span>, <span class="st">&quot;right&quot;</span>), <span class="dt">name =</span> <span class="st">&quot;&quot;</span>,
  <span class="dt">nameLocation =</span> <span class="kw">c</span>(<span class="st">&quot;end&quot;</span>, <span class="st">&quot;start&quot;</span>), <span class="dt">nameTextStyle =</span> <span class="kw">emptyList</span>(),
  <span class="dt">boundaryGap =</span> <span class="kw">c</span>(<span class="dv">0</span>, <span class="dv">0</span>), <span class="dt">min =</span> <span class="ot">NULL</span>, <span class="dt">max =</span> <span class="ot">NULL</span>, <span class="dt">scale =</span> <span class="ot">TRUE</span>,
  <span class="dt">splitNumber =</span> <span class="ot">NULL</span>, <span class="dt">axisLine =</span> <span class="kw">list</span>(<span class="dt">show =</span> <span class="ot">TRUE</span>, <span class="dt">onZero =</span> <span class="ot">FALSE</span>),
  <span class="dt">axisTick =</span> <span class="kw">list</span>(<span class="dt">show =</span> <span class="ot">FALSE</span>), <span class="dt">axisLabel =</span> <span class="kw">list</span>(<span class="dt">show =</span> <span class="ot">TRUE</span>),
  <span class="dt">splitLine =</span> <span class="kw">list</span>(<span class="dt">show =</span> <span class="ot">TRUE</span>), <span class="dt">splitArea =</span> <span class="kw">list</span>(<span class="dt">show =</span> <span class="ot">FALSE</span>),
  <span class="dt">data =</span> <span class="kw">list</span>())

<span class="kw">setYAxis</span>(chart, ...)

<span class="kw">setY1Axis</span>(chart, ...)

<span class="kw">setXAxis</span>(chart, ...)

<span class="kw">setX1Axis</span>(chart, ...)</code></pre></div>
<table>
<colgroup>
<col width="17%" />
<col width="82%" />
</colgroup>
<thead>
<tr class="header">
<th>Arg</th>
<th>Requirement</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><p><strong>chart</strong></p></td>
<td><p>Echarts object generated by <code>echartR</code> or <code>echart</code>.</p></td>
</tr>
<tr class="even">
<td><p>series</p></td>
<td><p>Which series to be put on this axis. When set NULL, apply to all. Could be:</p>
<ul>
<li>series names, in vectors. E.g, c(‘setosa’, ‘virginica’);</li>
<li>index of series, in vectors. E.g., 1:2 or c(1,3).</li>
</ul></td>
</tr>
<tr class="odd">
<td><p>which</p></td>
<td><p>Which axis to be modified. Could be one of the following:</p>
<ul>
<li>x: primary x-axis</li>
<li>y: primary y-axis</li>
<li>x1: secondary x-axis</li>
<li>y1: secondary y-axis</li>
</ul></td>
</tr>
<tr class="even">
<td><p>type</p></td>
<td><p>Type of the axis. Could be c(‘time’, ‘value’, ‘category’, ‘log’). Default ‘value’.</p></td>
</tr>
<tr class="odd">
<td><p>show</p></td>
<td><p>Logical, whether to show this axis. Default TRUE.</p></td>
</tr>
<tr class="even">
<td><p>position</p></td>
<td><p>Position of this axis. Could be c(‘bottom’, ‘top’, ‘left’, ‘right’) (default for primary x axis, secondary x axis, primary y axis and secondary y axis, respectively.)</p></td>
</tr>
<tr class="odd">
<td><p>name</p></td>
<td><p>Name of this axis. Default not set (“”).</p></td>
</tr>
<tr class="even">
<td><p>nameLocation</p></td>
<td><p>Location of the axis name. Could be c(‘start’, ‘end’). Default ‘end’.</p></td>
</tr>
<tr class="odd">
<td><p>nameTextStyle</p></td>
<td><p>Axis name text style. Could be a list of textStyle features. Default following textStyle global settings.</p></td>
</tr>
<tr class="even">
<td><p>boundaryGap</p></td>
<td><p>A two-element numeric vector, defining the policy of the space at the two ends of the axis (percents). Deafult c(0, 0).</p></td>
</tr>
<tr class="odd">
<td><p>min</p></td>
<td><p>The mininum value of the axis. Default NULL (automatic). If a numeric value is set, boundaryGap is disabled.</p></td>
</tr>
<tr class="even">
<td><p>max</p></td>
<td><p>The maxinum value of the axis. Default NULL (automatic). If a numeric value is set, boundaryGap is disabled.</p></td>
</tr>
<tr class="odd">
<td><p>scale</p></td>
<td><p>Logical, for axis of ‘value’, ‘time’, ‘log’ type, to define whether zoom the scale to the range between _min and _max. Default TRUE.</p></td>
</tr>
<tr class="even">
<td><p>splitNumber</p></td>
<td><p>Numeric, how many sections to devide the axis. Default NULL, automatically deviding based on algorithms of min and max.</p></td>
</tr>
<tr class="odd">
<td><p>axisLine</p></td>
<td><p>A list. Default: <code>list(show=TRUE, onZero=FALSE, lineStyle=lineStyle(</code> <code>type='solid', color='#48b', width=2, shadowColor='rgba(0,0,0,0)',</code> <code>shadowBlur=5, shadowOffsetX=3, shadowOffsetY=3))</code></p></td>
</tr>
<tr class="even">
<td><p>axisTick</p></td>
<td><p>A list. Default: <code>list(show=FALSE, inside=FALSE, length=5,</code> <code>lineStyle=lineStyle(color=&quot;#333&quot;, width=1))</code></p></td>
</tr>
<tr class="odd">
<td><p>axisLabel</p></td>
<td><p>A list controlling the axis labels. Default <code>list(show=TRUE, rotate=0, margin=8,</code> <code>clickable=FALSE, formatter=NULL,</code> <code>textStyle=list(color=&quot;#333&quot;))</code> <code>formatter</code> could be a sprintf/format string or JS function/expression. <code>axisLabel=list(formatter=&quot;%s cm&quot;)</code> is equal to</p>
<ul>
<li><code>axisLabel=list(formatter=JS('function (value) {return value + &quot;cm&quot;;}'))</code> or</li>
<li><code>axisLabel=list(formatter='{value} cm')</code></li>
</ul></td>
</tr>
<tr class="even">
<td><p>splitLine</p></td>
<td><p>A list controlling the split lines. Default <code>list(show=TRUE, lineStyle=``lineStyle(color=list(&quot;#ccc&quot;), width=1, type=&quot;solid&quot;))</code></p></td>
</tr>
<tr class="odd">
<td><p>splitArea</p></td>
<td><p>A list controlling the split areas. Default <code>list(show=FALSE, onGap=NULL,</code> <code>areaStyle=areaStyle(color= list(&quot;rgba(250,250,250,0.3)&quot;,</code> <code>&quot;rgba(200,200,200,0.3)&quot;) , type=&quot;default&quot;)</code></p></td>
</tr>
<tr class="even">
<td><p>data</p></td>
<td><p>A character vector/list for axis of type ‘category’, to define the text labels shown in this axis. Default NULL. You can even pass in a complicated list with textSytle list: <code>list('Jan', 'Feb', 'Mar',</code> <code>list(value='Apr', textStyle=list(color='red', ...)), 'May', ...)</code></p></td>
</tr>
<tr class="odd">
<td><p>…</p></td>
<td><p>Elipsis.</p></td>
</tr>
</tbody>
</table>
</div>
<div id="showcase" class="section level1">
<h1><span class="header-section-number">3</span> Showcase</h1>
<div id="data-preparation" class="section level2">
<h2><span class="header-section-number">3.1</span> Data Preparation</h2>
<p>Let’s use <code>airquality</code> to generate 4 Echarts objects <code>g1</code> - <code>g4</code>:</p>
<table>
<thead>
<tr class="header">
<th><strong>timeline</strong></th>
<th><strong>mono series</strong></th>
<th><strong>multi series</strong></th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><strong>no</strong></td>
<td><code>g1</code></td>
<td><code>g2</code></td>
</tr>
<tr class="even">
<td><strong>yes</strong></td>
<td><code>g3</code></td>
<td><code>g4</code></td>
</tr>
</tbody>
</table>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">require</span>(data.table)
aq &lt;-<span class="st"> </span>airquality
aq$Date &lt;-<span class="st"> </span><span class="kw">as.Date</span>(<span class="kw">paste</span>(<span class="st">&#39;1973&#39;</span>, aq$Month, aq$Day, <span class="dt">sep=</span><span class="st">&#39;-&#39;</span>))
g1 &lt;-<span class="st"> </span><span class="kw">echartr</span>(aq, Date, Temp, <span class="dt">type=</span><span class="st">&#39;curve&#39;</span>) %&gt;%<span class="st"> </span><span class="kw">setToolbox</span>(<span class="dt">pos=</span><span class="dv">3</span>)
g2 &lt;-<span class="st"> </span><span class="kw">echartr</span>(aq, Day, Temp, Month, <span class="dt">type=</span><span class="st">&#39;curve&#39;</span>) %&gt;%<span class="st"> </span><span class="kw">setToolbox</span>(<span class="dt">pos=</span><span class="dv">3</span>)
g3 &lt;-<span class="st"> </span><span class="kw">echartr</span>(aq, Day, Temp, <span class="dt">t=</span>Month, <span class="dt">type=</span><span class="st">&#39;curve&#39;</span>) %&gt;%<span class="st"> </span><span class="kw">setToolbox</span>(<span class="dt">pos=</span><span class="dv">3</span>)
aq1 &lt;-<span class="st"> </span><span class="kw">melt</span>(aq, <span class="dt">id=</span><span class="kw">c</span>(<span class="st">&#39;Month&#39;</span>, <span class="st">&#39;Day&#39;</span>), <span class="dt">measure=</span><span class="kw">c</span>(<span class="st">&#39;Temp&#39;</span>, <span class="st">&#39;Wind&#39;</span>), 
            <span class="dt">variable=</span><span class="st">&#39;Param&#39;</span>)
g4 &lt;-<span class="st"> </span><span class="kw">echartr</span>(aq1, Day, value, Param, <span class="dt">t=</span>Month, <span class="dt">type=</span><span class="st">&#39;curve&#39;</span>) %&gt;%<span class="st"> </span>
<span class="st">    </span><span class="kw">setToolbox</span>(<span class="dt">pos=</span><span class="dv">3</span>)</code></pre></div>
</div>
<div id="modification" class="section level2">
<h2><span class="header-section-number">3.2</span> Modification</h2>
<p>You can change the appearance of the axis: axis title, split number, axis tick labels. Pay attention to <code>formatter</code> in <code>axisLabel</code>: it requires JavaScript, so you can always compose a JS function. Or you can use a sprintf format string.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">g1 %&gt;%<span class="st"> </span><span class="kw">setXAxis</span>(<span class="dt">name=</span><span class="st">&#39;m/d&#39;</span>, <span class="dt">splitNumber=</span><span class="dv">20</span>, <span class="dt">axisLabel=</span><span class="kw">list</span>(
    <span class="dt">formatter=</span><span class="st">&#39;%m/%d&#39;</span>, <span class="dt">rotate=</span><span class="dv">90</span>)) %&gt;%
<span class="st">    </span><span class="kw">setYAxis</span>(<span class="dt">axisLabel=</span><span class="kw">list</span>(<span class="dt">formatter=</span><span class="st">&#39;{value} °C&#39;</span>)) </code></pre></div>
<p>is equivalent to</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">g1 %&gt;%<span class="st"> </span><span class="kw">setXAxis</span>(<span class="dt">name=</span><span class="st">&#39;m/d&#39;</span>, <span class="dt">splitNumber=</span><span class="dv">20</span>, <span class="dt">axisLabel=</span><span class="kw">list</span>(
       <span class="dt">formatter=</span><span class="kw">JS</span>(<span class="st">&#39;function (v) {</span>
<span class="st">                    return v.getMonth() + 1 + &quot;/&quot; + v.getDate();</span>
<span class="st">                    }&#39;</span>),
       <span class="dt">rotate=</span><span class="dv">90</span>)) %&gt;%
<span class="st">       </span><span class="kw">setYAxis</span>(<span class="dt">axisLabel=</span><span class="kw">list</span>(<span class="dt">formatter=</span><span class="st">&#39;{value} °C&#39;</span>))</code></pre></div>
<table>
<tr>
<td>
<div id="htmlwidget-346d127147d1ada5af54" style="width:400px;height:300px;" class="echarts html-widget"></div>
<script type="application/json" data-for="htmlwidget-346d127147d1ada5af54">{"x":{"series":[{"type":"line","data":[[105033600000,67],[105120000000,72],[105206400000,74],[105292800000,62],[105379200000,56],[105465600000,66],[105552000000,65],[105638400000,59],[105724800000,61],[105811200000,69],[105897600000,74],[105984000000,69],[106070400000,66],[106156800000,68],[106243200000,58],[106329600000,64],[106416000000,66],[106502400000,57],[106588800000,68],[106675200000,62],[106761600000,59],[106848000000,73],[106934400000,61],[107020800000,61],[107107200000,57],[107193600000,58],[107280000000,57],[107366400000,67],[107452800000,81],[107539200000,79],[107625600000,76],[107712000000,78],[107798400000,74],[107884800000,67],[107971200000,84],[108057600000,85],[108144000000,79],[108230400000,82],[108316800000,87],[108403200000,90],[108489600000,87],[108576000000,93],[108662400000,92],[108748800000,82],[108835200000,80],[108921600000,79],[109008000000,77],[109094400000,72],[109180800000,65],[109267200000,73],[109353600000,76],[109440000000,77],[109526400000,76],[109612800000,76],[109699200000,76],[109785600000,75],[109872000000,78],[109958400000,73],[110044800000,80],[110131200000,77],[110217600000,83],[110304000000,84],[110390400000,85],[110476800000,81],[110563200000,84],[110649600000,83],[110736000000,83],[110822400000,88],[110908800000,92],[110995200000,92],[111081600000,89],[111168000000,82],[111254400000,73],[111340800000,81],[111427200000,91],[111513600000,80],[111600000000,81],[111686400000,82],[111772800000,84],[111859200000,87],[111945600000,85],[112032000000,74],[112118400000,81],[112204800000,82],[112291200000,86],[112377600000,85],[112464000000,82],[112550400000,86],[112636800000,88],[112723200000,86],[112809600000,83],[112896000000,81],[112982400000,81],[113068800000,81],[113155200000,82],[113241600000,86],[113328000000,85],[113414400000,87],[113500800000,89],[113587200000,90],[113673600000,90],[113760000000,92],[113846400000,86],[113932800000,86],[114019200000,82],[114105600000,80],[114192000000,79],[114278400000,77],[114364800000,79],[114451200000,76],[114537600000,78],[114624000000,78],[114710400000,77],[114796800000,72],[114883200000,75],[114969600000,79],[115056000000,81],[115142400000,86],[115228800000,88],[115315200000,97],[115401600000,94],[115488000000,96],[115574400000,94],[115660800000,91],[115747200000,92],[115833600000,93],[115920000000,93],[116006400000,87],[116092800000,84],[116179200000,80],[116265600000,78],[116352000000,75],[116438400000,73],[116524800000,81],[116611200000,76],[116697600000,77],[116784000000,71],[116870400000,71],[116956800000,78],[117043200000,67],[117129600000,76],[117216000000,68],[117302400000,82],[117388800000,64],[117475200000,71],[117561600000,81],[117648000000,69],[117734400000,63],[117820800000,70],[117907200000,77],[117993600000,75],[118080000000,76],[118166400000,68]],"smooth":true,"showAllSymbol":true}],"yAxis":[{"type":"value","show":true,"position":"left","name":"Temp","nameLocation":"end","boundaryGap":[0,0],"scale":true,"axisLine":{"show":true,"onZero":false},"axisTick":{"show":false},"axisLabel":{"show":true},"splitLine":{"show":true},"splitArea":{"show":false}}],"xAxis":[{"type":"time","show":true,"position":"bottom","name":"Date","nameLocation":"end","boundaryGap":[0,0],"scale":true,"axisLine":{"show":true,"onZero":false},"axisTick":{"show":false},"axisLabel":{"show":true},"splitLine":{"show":true},"splitArea":{"show":false}}],"tooltip":{"show":true,"trigger":"item","axisPointer":{"type":"line","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"formatter":"function (params) {\n       var i;\n       var j;\n       var sDate;\n       var text;\n       var text1;\n       var sName = \"\";\n       if (params.length > 1){\n            if (params[0].value.length >1) {\n                text1 = params[0].value[0];\n            } else {\n                text1 = params[0].value;\n            }\n            sDate = new Date(text1);\n            text = params[0].name;\n            if (params[0].seriesName) {\n                sName = params[0].seriesName;\n            }\n       } else {\n            if (params.value.length > 1) {\n                text1 = params.value[0];\n            } else {\n                text1 = params.value;\n            }\n            sDate = new Date(text1);\n            text = params.name;\n            if (params.seriesName) {\n                sName = params.seriesName;\n            }\n       }\n       if (sDate.getMonth && !isNaN(sDate.getMonth())) {\n            if (sDate.getMinutes() < 10) {\n                min = \"0\" + sDate.getMinutes();\n            } else {\n                min = sDate.getMinutes();\n            }\n            if (sDate.getSeconds() < 10) {\n                sec = \"0\" + sDate.getSeconds();\n            } else {\n                sec = sDate.getSeconds();\n            }\n            text1 = sName + sDate.getFullYear() + \"-\"\n                + (sDate.getMonth() + 1) + \"-\"\n                + sDate.getDate() + \" \"\n                + sDate.getHours() + \":\" + min + \":\" + sec;\n       }\n       if (params.length > 1) {\n           text += \"<br/>\" + params[0].seriesName + \" :  \" + text1;\n           if (params[0].value.length > 1){\n                for (j = 1; j < params[0].value.length; j++) {\n                    text += \", \" + params[0].value[j];\n                }\n           }\n           for (i = 1; i < params.length; i++) {\n                if (params[i].value.length > 1) {\n                   text += \"<br/>\" + params[i].seriesName + \" :  \"\n                        + params[i].value[0];\n                   for (j = 1; j < params[i].value.length; j++) {\n                        text += \", \" + params[i].value[j];\n                   }\n                } else {\n                   text += \"<br/>\" + params[i].seriesName + \" :  \"\n                        + params[i].value;\n                }\n           }\n       } else {\n           if (params.seriesName) {\n               text += \"<br/>\" + params.seriesName + \" :  \" + text1;\n           } else {\n               text = text1;\n           }\n           if (params.value.length > 1){\n                for (j = 1; j < params.value.length; j++) {\n                    text += \", \" + params.value[j];\n                }\n           }\n       }\n       return text;\n    }","islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":true,"type":["line","bar","tiled","stack"]},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"center","orient":"vertical"},"legend":{"show":true,"data":[],"x":"left","y":"top","orient":"horizontal"}},"evals":["tooltip.formatter"],"jsHooks":[]}</script>
</td>
<td>
<div id="htmlwidget-522bd64f9b523f90c4b2" style="width:400px;height:300px;" class="echarts html-widget"></div>
<script type="application/json" data-for="htmlwidget-522bd64f9b523f90c4b2">{"x":{"series":[{"type":"line","data":[[105033600000,67],[105120000000,72],[105206400000,74],[105292800000,62],[105379200000,56],[105465600000,66],[105552000000,65],[105638400000,59],[105724800000,61],[105811200000,69],[105897600000,74],[105984000000,69],[106070400000,66],[106156800000,68],[106243200000,58],[106329600000,64],[106416000000,66],[106502400000,57],[106588800000,68],[106675200000,62],[106761600000,59],[106848000000,73],[106934400000,61],[107020800000,61],[107107200000,57],[107193600000,58],[107280000000,57],[107366400000,67],[107452800000,81],[107539200000,79],[107625600000,76],[107712000000,78],[107798400000,74],[107884800000,67],[107971200000,84],[108057600000,85],[108144000000,79],[108230400000,82],[108316800000,87],[108403200000,90],[108489600000,87],[108576000000,93],[108662400000,92],[108748800000,82],[108835200000,80],[108921600000,79],[109008000000,77],[109094400000,72],[109180800000,65],[109267200000,73],[109353600000,76],[109440000000,77],[109526400000,76],[109612800000,76],[109699200000,76],[109785600000,75],[109872000000,78],[109958400000,73],[110044800000,80],[110131200000,77],[110217600000,83],[110304000000,84],[110390400000,85],[110476800000,81],[110563200000,84],[110649600000,83],[110736000000,83],[110822400000,88],[110908800000,92],[110995200000,92],[111081600000,89],[111168000000,82],[111254400000,73],[111340800000,81],[111427200000,91],[111513600000,80],[111600000000,81],[111686400000,82],[111772800000,84],[111859200000,87],[111945600000,85],[112032000000,74],[112118400000,81],[112204800000,82],[112291200000,86],[112377600000,85],[112464000000,82],[112550400000,86],[112636800000,88],[112723200000,86],[112809600000,83],[112896000000,81],[112982400000,81],[113068800000,81],[113155200000,82],[113241600000,86],[113328000000,85],[113414400000,87],[113500800000,89],[113587200000,90],[113673600000,90],[113760000000,92],[113846400000,86],[113932800000,86],[114019200000,82],[114105600000,80],[114192000000,79],[114278400000,77],[114364800000,79],[114451200000,76],[114537600000,78],[114624000000,78],[114710400000,77],[114796800000,72],[114883200000,75],[114969600000,79],[115056000000,81],[115142400000,86],[115228800000,88],[115315200000,97],[115401600000,94],[115488000000,96],[115574400000,94],[115660800000,91],[115747200000,92],[115833600000,93],[115920000000,93],[116006400000,87],[116092800000,84],[116179200000,80],[116265600000,78],[116352000000,75],[116438400000,73],[116524800000,81],[116611200000,76],[116697600000,77],[116784000000,71],[116870400000,71],[116956800000,78],[117043200000,67],[117129600000,76],[117216000000,68],[117302400000,82],[117388800000,64],[117475200000,71],[117561600000,81],[117648000000,69],[117734400000,63],[117820800000,70],[117907200000,77],[117993600000,75],[118080000000,76],[118166400000,68]],"smooth":true,"showAllSymbol":true}],"yAxis":[{"type":"value","show":true,"position":"left","name":"Temp","nameLocation":"end","boundaryGap":[0,0],"scale":true,"axisLine":{"show":true,"onZero":false},"axisTick":{"show":false},"axisLabel":{"show":true,"formatter":"{value} °C"},"splitLine":{"show":true},"splitArea":{"show":false}}],"xAxis":[{"type":"time","show":true,"position":"bottom","name":"m/d","nameLocation":"end","boundaryGap":[0,0],"scale":true,"axisLine":{"show":true,"onZero":false},"axisTick":{"show":false},"axisLabel":{"show":true,"formatter":"function(x) {var monthNames = ['January', 'February', 'March',\n                        'April', 'May', 'June', 'July', 'August', 'September',\n                        'October', 'November', 'December'];var weekNames = ['Monday', 'Tuesday', 'Wednesday',\n                        'Thursday', 'Friday', 'Saturday', 'Sunday'];return  x.getMonth() + 1 + '/' + x.getDate();}","rotate":90},"splitLine":{"show":true},"splitArea":{"show":false},"splitNumber":20}],"tooltip":{"show":true,"trigger":"item","axisPointer":{"type":"line","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"formatter":"function (params) {\n       var i;\n       var j;\n       var sDate;\n       var text;\n       var text1;\n       var sName = \"\";\n       if (params.length > 1){\n            if (params[0].value.length >1) {\n                text1 = params[0].value[0];\n            } else {\n                text1 = params[0].value;\n            }\n            sDate = new Date(text1);\n            text = params[0].name;\n            if (params[0].seriesName) {\n                sName = params[0].seriesName;\n            }\n       } else {\n            if (params.value.length > 1) {\n                text1 = params.value[0];\n            } else {\n                text1 = params.value;\n            }\n            sDate = new Date(text1);\n            text = params.name;\n            if (params.seriesName) {\n                sName = params.seriesName;\n            }\n       }\n       if (sDate.getMonth && !isNaN(sDate.getMonth())) {\n            if (sDate.getMinutes() < 10) {\n                min = \"0\" + sDate.getMinutes();\n            } else {\n                min = sDate.getMinutes();\n            }\n            if (sDate.getSeconds() < 10) {\n                sec = \"0\" + sDate.getSeconds();\n            } else {\n                sec = sDate.getSeconds();\n            }\n            text1 = sName + sDate.getFullYear() + \"-\"\n                + (sDate.getMonth() + 1) + \"-\"\n                + sDate.getDate() + \" \"\n                + sDate.getHours() + \":\" + min + \":\" + sec;\n       }\n       if (params.length > 1) {\n           text += \"<br/>\" + params[0].seriesName + \" :  \" + text1;\n           if (params[0].value.length > 1){\n                for (j = 1; j < params[0].value.length; j++) {\n                    text += \", \" + params[0].value[j];\n                }\n           }\n           for (i = 1; i < params.length; i++) {\n                if (params[i].value.length > 1) {\n                   text += \"<br/>\" + params[i].seriesName + \" :  \"\n                        + params[i].value[0];\n                   for (j = 1; j < params[i].value.length; j++) {\n                        text += \", \" + params[i].value[j];\n                   }\n                } else {\n                   text += \"<br/>\" + params[i].seriesName + \" :  \"\n                        + params[i].value;\n                }\n           }\n       } else {\n           if (params.seriesName) {\n               text += \"<br/>\" + params.seriesName + \" :  \" + text1;\n           } else {\n               text = text1;\n           }\n           if (params.value.length > 1){\n                for (j = 1; j < params.value.length; j++) {\n                    text += \", \" + params.value[j];\n                }\n           }\n       }\n       return text;\n    }","islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":true,"type":["line","bar","tiled","stack"]},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"center","orient":"vertical"},"legend":{"show":true,"data":[],"x":"left","y":"top","orient":"horizontal"}},"evals":["xAxis.0.axisLabel.formatter","tooltip.formatter"],"jsHooks":[]}</script>
</td>
</tr>
</table>
<p>You can set series 2-4 (June-August) to secondary y-axis…</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">g2 %&gt;%<span class="st"> </span><span class="kw">setY1Axis</span>(<span class="dt">series=</span><span class="dv">2</span>:<span class="dv">4</span>, <span class="dt">name=</span><span class="st">&#39;Summer Temp&#39;</span>)</code></pre></div>
<table>
<tr>
<td>
<div id="htmlwidget-aa8199741f59db2e86c4" style="width:400px;height:300px;" class="echarts html-widget"></div>
<script type="application/json" data-for="htmlwidget-aa8199741f59db2e86c4">{"x":{"series":[{"name":"5","type":"line","data":[[1,67],[2,72],[3,74],[4,62],[5,56],[6,66],[7,65],[8,59],[9,61],[10,69],[11,74],[12,69],[13,66],[14,68],[15,58],[16,64],[17,66],[18,57],[19,68],[20,62],[21,59],[22,73],[23,61],[24,61],[25,57],[26,58],[27,57],[28,67],[29,81],[30,79],[31,76]],"smooth":true,"showAllSymbol":true},{"name":"6","type":"line","data":[[1,78],[2,74],[3,67],[4,84],[5,85],[6,79],[7,82],[8,87],[9,90],[10,87],[11,93],[12,92],[13,82],[14,80],[15,79],[16,77],[17,72],[18,65],[19,73],[20,76],[21,77],[22,76],[23,76],[24,76],[25,75],[26,78],[27,73],[28,80],[29,77],[30,83]],"showAllSymbol":true},{"name":"7","type":"line","data":[[1,84],[2,85],[3,81],[4,84],[5,83],[6,83],[7,88],[8,92],[9,92],[10,89],[11,82],[12,73],[13,81],[14,91],[15,80],[16,81],[17,82],[18,84],[19,87],[20,85],[21,74],[22,81],[23,82],[24,86],[25,85],[26,82],[27,86],[28,88],[29,86],[30,83],[31,81]],"showAllSymbol":true},{"name":"8","type":"line","data":[[1,81],[2,81],[3,82],[4,86],[5,85],[6,87],[7,89],[8,90],[9,90],[10,92],[11,86],[12,86],[13,82],[14,80],[15,79],[16,77],[17,79],[18,76],[19,78],[20,78],[21,77],[22,72],[23,75],[24,79],[25,81],[26,86],[27,88],[28,97],[29,94],[30,96],[31,94]],"showAllSymbol":true},{"name":"9","type":"line","data":[[1,91],[2,92],[3,93],[4,93],[5,87],[6,84],[7,80],[8,78],[9,75],[10,73],[11,81],[12,76],[13,77],[14,71],[15,71],[16,78],[17,67],[18,76],[19,68],[20,82],[21,64],[22,71],[23,81],[24,69],[25,63],[26,70],[27,77],[28,75],[29,76],[30,68]],"showAllSymbol":true}],"legend":{"show":true,"data":["5","6","7","8","9"],"x":"left","y":"top","orient":"horizontal"},"yAxis":[{"type":"value","show":true,"position":"left","name":"Temp","nameLocation":"end","boundaryGap":[0,0],"scale":true,"axisLine":{"show":true,"onZero":false},"axisTick":{"show":false},"axisLabel":{"show":true},"splitLine":{"show":true},"splitArea":{"show":false}}],"xAxis":[{"type":"value","show":true,"position":"bottom","name":"Day","nameLocation":"end","boundaryGap":[0,0],"scale":true,"axisLine":{"show":true,"onZero":false},"axisTick":{"show":false},"axisLabel":{"show":true},"splitLine":{"show":true},"splitArea":{"show":false}}],"tooltip":{"show":true,"trigger":"axis","axisPointer":{"type":"line","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"formatter":"function (params) {\n       var i;\n       var j;\n       var text;\n       var text1;\n       var sName = \"\";\n       if (params.length > 1){\n            if (params[0].value.length >1) {\n                text1 = params[0].value[0];\n            } else {\n                text1 = params[0].value;\n            }\n            text = params[0].name;\n            if (params[0].seriesName) {\n                sName = params[0].seriesName;\n            }\n       } else {\n            if (params[0].value.length > 1) {\n                text1 = params[0].value[0];\n            } else {\n                text1 = params[0].value;\n            }\n            text = params[0].name;\n            if (params[0].seriesName) {\n                sName = params[0].seriesName;\n            }\n       }\n       if (params.length > 1){\n           text += \"<br/>\" + params[0].seriesName + \" :  \" + text1;\n           if (params[0].value.length > 1){\n                for (j = 1; j < params[0].value.length; j++){\n                    text += \", \" + params[0].value[j];\n                }\n           }\n           for (i = 1; i < params.length; i++) {\n                if (params[i].value.length > 1){\n                   text += \"<br/>\" + params[i].seriesName + \" :  \"\n                        + params[i].value[0];\n                   for (j = 1; j < params[i].value.length; j++){\n                        text += \", \" + params[i].value[j];\n                   }\n                } else {\n                   text += \"<br/>\" + params[i].seriesName + \" :  \"\n                        + params[i].value;\n                }\n           }\n       } else {\n           if (params[0].seriesName){\n               text += \"<br/>\" + params[0].seriesName + \" :  \" + text1;\n           } else {\n               text += \" :  \" + text1;\n           }\n           if (params[0].value.length > 1){\n                for (j = 1; j < params[0].value.length; j++){\n                    text += \", \" + params[0].value[j];\n                }\n           }\n       }\n       return text;\n    }","islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":true,"type":["line","bar","tiled","stack"]},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"center","orient":"vertical"}},"evals":["tooltip.formatter"],"jsHooks":[]}</script>
</td>
<td>
<div id="htmlwidget-f6fae7c53676240ddcfb" style="width:400px;height:300px;" class="echarts html-widget"></div>
<script type="application/json" data-for="htmlwidget-f6fae7c53676240ddcfb">{"x":{"series":[{"name":"5","type":"line","data":[[1,67],[2,72],[3,74],[4,62],[5,56],[6,66],[7,65],[8,59],[9,61],[10,69],[11,74],[12,69],[13,66],[14,68],[15,58],[16,64],[17,66],[18,57],[19,68],[20,62],[21,59],[22,73],[23,61],[24,61],[25,57],[26,58],[27,57],[28,67],[29,81],[30,79],[31,76]],"smooth":true,"showAllSymbol":true},{"name":"6","type":"line","data":[[1,78],[2,74],[3,67],[4,84],[5,85],[6,79],[7,82],[8,87],[9,90],[10,87],[11,93],[12,92],[13,82],[14,80],[15,79],[16,77],[17,72],[18,65],[19,73],[20,76],[21,77],[22,76],[23,76],[24,76],[25,75],[26,78],[27,73],[28,80],[29,77],[30,83]],"showAllSymbol":true,"yAxisIndex":1},{"name":"7","type":"line","data":[[1,84],[2,85],[3,81],[4,84],[5,83],[6,83],[7,88],[8,92],[9,92],[10,89],[11,82],[12,73],[13,81],[14,91],[15,80],[16,81],[17,82],[18,84],[19,87],[20,85],[21,74],[22,81],[23,82],[24,86],[25,85],[26,82],[27,86],[28,88],[29,86],[30,83],[31,81]],"showAllSymbol":true,"yAxisIndex":1},{"name":"8","type":"line","data":[[1,81],[2,81],[3,82],[4,86],[5,85],[6,87],[7,89],[8,90],[9,90],[10,92],[11,86],[12,86],[13,82],[14,80],[15,79],[16,77],[17,79],[18,76],[19,78],[20,78],[21,77],[22,72],[23,75],[24,79],[25,81],[26,86],[27,88],[28,97],[29,94],[30,96],[31,94]],"showAllSymbol":true,"yAxisIndex":1},{"name":"9","type":"line","data":[[1,91],[2,92],[3,93],[4,93],[5,87],[6,84],[7,80],[8,78],[9,75],[10,73],[11,81],[12,76],[13,77],[14,71],[15,71],[16,78],[17,67],[18,76],[19,68],[20,82],[21,64],[22,71],[23,81],[24,69],[25,63],[26,70],[27,77],[28,75],[29,76],[30,68]],"showAllSymbol":true}],"legend":{"show":true,"data":["5","6","7","8","9"],"x":"left","y":"top","orient":"horizontal"},"yAxis":[{"type":"value","show":true,"position":"left","name":"Temp","nameLocation":"end","boundaryGap":[0,0],"scale":true,"axisLine":{"show":true,"onZero":false},"axisTick":{"show":false},"axisLabel":{"show":true},"splitLine":{"show":true},"splitArea":{"show":false}},{"type":"value","show":true,"position":"right","name":"Summer Temp","nameLocation":"end","boundaryGap":[0,0],"scale":true,"axisLine":{"show":true,"onZero":false},"axisTick":{"show":false},"axisLabel":{"show":true},"splitLine":{"show":true},"splitArea":{"show":false}}],"xAxis":[{"type":"value","show":true,"position":"bottom","name":"Day","nameLocation":"end","boundaryGap":[0,0],"scale":true,"axisLine":{"show":true,"onZero":false},"axisTick":{"show":false},"axisLabel":{"show":true},"splitLine":{"show":true},"splitArea":{"show":false}}],"tooltip":{"show":true,"trigger":"axis","axisPointer":{"type":"line","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"formatter":"function (params) {\n       var i;\n       var j;\n       var text;\n       var text1;\n       var sName = \"\";\n       if (params.length > 1){\n            if (params[0].value.length >1) {\n                text1 = params[0].value[0];\n            } else {\n                text1 = params[0].value;\n            }\n            text = params[0].name;\n            if (params[0].seriesName) {\n                sName = params[0].seriesName;\n            }\n       } else {\n            if (params[0].value.length > 1) {\n                text1 = params[0].value[0];\n            } else {\n                text1 = params[0].value;\n            }\n            text = params[0].name;\n            if (params[0].seriesName) {\n                sName = params[0].seriesName;\n            }\n       }\n       if (params.length > 1){\n           text += \"<br/>\" + params[0].seriesName + \" :  \" + text1;\n           if (params[0].value.length > 1){\n                for (j = 1; j < params[0].value.length; j++){\n                    text += \", \" + params[0].value[j];\n                }\n           }\n           for (i = 1; i < params.length; i++) {\n                if (params[i].value.length > 1){\n                   text += \"<br/>\" + params[i].seriesName + \" :  \"\n                        + params[i].value[0];\n                   for (j = 1; j < params[i].value.length; j++){\n                        text += \", \" + params[i].value[j];\n                   }\n                } else {\n                   text += \"<br/>\" + params[i].seriesName + \" :  \"\n                        + params[i].value;\n                }\n           }\n       } else {\n           if (params[0].seriesName){\n               text += \"<br/>\" + params[0].seriesName + \" :  \" + text1;\n           } else {\n               text += \" :  \" + text1;\n           }\n           if (params[0].value.length > 1){\n                for (j = 1; j < params[0].value.length; j++){\n                    text += \", \" + params[0].value[j];\n                }\n           }\n       }\n       return text;\n    }","islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":true,"type":["line","bar","tiled","stack"]},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"center","orient":"vertical"}},"evals":["tooltip.formatter"],"jsHooks":[]}</script>
</td>
</tr>
</table>
<p>but you cannot assign timeline-specific axes. What about an academic style axis? That means removing all the vertical splitLines and set the borderWidth of the pane grid zero.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">g3 %&gt;%<span class="st"> </span><span class="kw">setXAxis</span>(<span class="dt">splitLine=</span><span class="kw">list</span>(<span class="dt">show=</span><span class="ot">FALSE</span>)) %&gt;%<span class="st"> </span><span class="kw">setGrid</span>(<span class="dt">borderWidth=</span><span class="dv">0</span>) %&gt;%
<span class="st">    </span><span class="kw">setYAxis</span>(<span class="dt">axisLine=</span><span class="kw">list</span>(<span class="dt">lineStyle=</span><span class="kw">lineStyle</span>(<span class="dt">width=</span><span class="dv">0</span>)))</code></pre></div>
<table>
<tr>
<td>
<div id="htmlwidget-a701d8ba981a6a5f11e6" style="width:400px;height:300px;" class="echarts html-widget"></div>
<script type="application/json" data-for="htmlwidget-a701d8ba981a6a5f11e6">{"x":{"timeline":{"type":"number","data":[5,6,7,8,9],"x":80,"x2":80},"options":[{"series":[{"type":"line","data":[[1,67],[2,72],[3,74],[4,62],[5,56],[6,66],[7,65],[8,59],[9,61],[10,69],[11,74],[12,69],[13,66],[14,68],[15,58],[16,64],[17,66],[18,57],[19,68],[20,62],[21,59],[22,73],[23,61],[24,61],[25,57],[26,58],[27,57],[28,67],[29,81],[30,79],[31,76]],"smooth":true,"showAllSymbol":true}],"yAxis":[{"type":"value","show":true,"position":"left","name":"Temp","nameLocation":"end","boundaryGap":[0,0],"scale":true,"axisLine":{"show":true,"onZero":false},"axisTick":{"show":false},"axisLabel":{"show":true},"splitLine":{"show":true},"splitArea":{"show":false}}],"xAxis":[{"type":"value","show":true,"position":"bottom","name":"Day","nameLocation":"end","boundaryGap":[0,0],"scale":true,"axisLine":{"show":true,"onZero":false},"axisTick":{"show":false},"axisLabel":{"show":true},"splitLine":{"show":true},"splitArea":{"show":false}}],"tooltip":{"show":true,"trigger":"axis","axisPointer":{"type":"line","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"formatter":"function (params) {\n       var i;\n       var j;\n       var text;\n       var text1;\n       var sName = \"\";\n       if (params.length > 1){\n            if (params[0].value.length >1) {\n                text1 = params[0].value[0];\n            } else {\n                text1 = params[0].value;\n            }\n            text = params[0].name;\n            if (params[0].seriesName) {\n                sName = params[0].seriesName;\n            }\n       } else {\n            if (params[0].value.length > 1) {\n                text1 = params[0].value[0];\n            } else {\n                text1 = params[0].value;\n            }\n            text = params[0].name;\n            if (params[0].seriesName) {\n                sName = params[0].seriesName;\n            }\n       }\n       if (params.length > 1){\n           text += \"<br/>\" + params[0].seriesName + \" :  \" + text1;\n           if (params[0].value.length > 1){\n                for (j = 1; j < params[0].value.length; j++){\n                    text += \", \" + params[0].value[j];\n                }\n           }\n           for (i = 1; i < params.length; i++) {\n                if (params[i].value.length > 1){\n                   text += \"<br/>\" + params[i].seriesName + \" :  \"\n                        + params[i].value[0];\n                   for (j = 1; j < params[i].value.length; j++){\n                        text += \", \" + params[i].value[j];\n                   }\n                } else {\n                   text += \"<br/>\" + params[i].seriesName + \" :  \"\n                        + params[i].value;\n                }\n           }\n       } else {\n           if (params[0].seriesName){\n               text += \"<br/>\" + params[0].seriesName + \" :  \" + text1;\n           } else {\n               text += \" :  \" + text1;\n           }\n           if (params[0].value.length > 1){\n                for (j = 1; j < params[0].value.length; j++){\n                    text += \", \" + params[0].value[j];\n                }\n           }\n       }\n       return text;\n    }","islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":true,"type":["line","bar","tiled","stack"]},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"center","orient":"vertical"},"legend":{"show":true,"data":[],"x":"left","y":"top","orient":"horizontal"}},{"series":[{"type":"line","data":[[1,78],[2,74],[3,67],[4,84],[5,85],[6,79],[7,82],[8,87],[9,90],[10,87],[11,93],[12,92],[13,82],[14,80],[15,79],[16,77],[17,72],[18,65],[19,73],[20,76],[21,77],[22,76],[23,76],[24,76],[25,75],[26,78],[27,73],[28,80],[29,77],[30,83]],"smooth":true,"showAllSymbol":true}]},{"series":[{"type":"line","data":[[1,84],[2,85],[3,81],[4,84],[5,83],[6,83],[7,88],[8,92],[9,92],[10,89],[11,82],[12,73],[13,81],[14,91],[15,80],[16,81],[17,82],[18,84],[19,87],[20,85],[21,74],[22,81],[23,82],[24,86],[25,85],[26,82],[27,86],[28,88],[29,86],[30,83],[31,81]],"smooth":true,"showAllSymbol":true}]},{"series":[{"type":"line","data":[[1,81],[2,81],[3,82],[4,86],[5,85],[6,87],[7,89],[8,90],[9,90],[10,92],[11,86],[12,86],[13,82],[14,80],[15,79],[16,77],[17,79],[18,76],[19,78],[20,78],[21,77],[22,72],[23,75],[24,79],[25,81],[26,86],[27,88],[28,97],[29,94],[30,96],[31,94]],"smooth":true,"showAllSymbol":true}]},{"series":[{"type":"line","data":[[1,91],[2,92],[3,93],[4,93],[5,87],[6,84],[7,80],[8,78],[9,75],[10,73],[11,81],[12,76],[13,77],[14,71],[15,71],[16,78],[17,67],[18,76],[19,68],[20,82],[21,64],[22,71],[23,81],[24,69],[25,63],[26,70],[27,77],[28,75],[29,76],[30,68]],"smooth":true,"showAllSymbol":true}]}]},"evals":["options.0.tooltip.formatter"],"jsHooks":[]}</script>
</td>
<td>
<div id="htmlwidget-b7c856775ed0f351782a" style="width:400px;height:300px;" class="echarts html-widget"></div>
<script type="application/json" data-for="htmlwidget-b7c856775ed0f351782a">{"x":{"timeline":{"type":"number","data":[5,6,7,8,9],"x":80,"x2":80},"options":[{"series":[{"type":"line","data":[[1,67],[2,72],[3,74],[4,62],[5,56],[6,66],[7,65],[8,59],[9,61],[10,69],[11,74],[12,69],[13,66],[14,68],[15,58],[16,64],[17,66],[18,57],[19,68],[20,62],[21,59],[22,73],[23,61],[24,61],[25,57],[26,58],[27,57],[28,67],[29,81],[30,79],[31,76]],"smooth":true,"showAllSymbol":true}],"yAxis":[{"type":"value","show":true,"position":"left","name":"Temp","nameLocation":"end","boundaryGap":[0,0],"scale":true,"axisLine":{"show":true,"onZero":false,"lineStyle":{"width":0}},"axisTick":{"show":false},"axisLabel":{"show":true,"formatter":"function(x){return '' + x.toFixed(1) + ' °C';}"},"splitLine":{"show":true},"splitArea":{"show":false}}],"xAxis":[{"type":"value","show":true,"position":"bottom","name":"Day","nameLocation":"end","boundaryGap":[0,0],"scale":true,"axisLine":{"show":true,"onZero":false},"axisTick":{"show":false},"axisLabel":{"show":true},"splitLine":{"show":false},"splitArea":{"show":false}}],"tooltip":{"show":true,"trigger":"axis","axisPointer":{"type":"line","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"formatter":"function (params) {\n       var i;\n       var j;\n       var text;\n       var text1;\n       var sName = \"\";\n       if (params.length > 1){\n            if (params[0].value.length >1) {\n                text1 = params[0].value[0];\n            } else {\n                text1 = params[0].value;\n            }\n            text = params[0].name;\n            if (params[0].seriesName) {\n                sName = params[0].seriesName;\n            }\n       } else {\n            if (params[0].value.length > 1) {\n                text1 = params[0].value[0];\n            } else {\n                text1 = params[0].value;\n            }\n            text = params[0].name;\n            if (params[0].seriesName) {\n                sName = params[0].seriesName;\n            }\n       }\n       if (params.length > 1){\n           text += \"<br/>\" + params[0].seriesName + \" :  \" + text1;\n           if (params[0].value.length > 1){\n                for (j = 1; j < params[0].value.length; j++){\n                    text += \", \" + params[0].value[j];\n                }\n           }\n           for (i = 1; i < params.length; i++) {\n                if (params[i].value.length > 1){\n                   text += \"<br/>\" + params[i].seriesName + \" :  \"\n                        + params[i].value[0];\n                   for (j = 1; j < params[i].value.length; j++){\n                        text += \", \" + params[i].value[j];\n                   }\n                } else {\n                   text += \"<br/>\" + params[i].seriesName + \" :  \"\n                        + params[i].value;\n                }\n           }\n       } else {\n           if (params[0].seriesName){\n               text += \"<br/>\" + params[0].seriesName + \" :  \" + text1;\n           } else {\n               text += \" :  \" + text1;\n           }\n           if (params[0].value.length > 1){\n                for (j = 1; j < params[0].value.length; j++){\n                    text += \", \" + params[0].value[j];\n                }\n           }\n       }\n       return text;\n    }","islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":true,"type":["line","bar","tiled","stack"]},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"center","orient":"vertical"},"legend":{"show":true,"data":[],"x":"left","y":"top","orient":"horizontal"},"grid":{"borderWidth":0}},{"series":[{"type":"line","data":[[1,78],[2,74],[3,67],[4,84],[5,85],[6,79],[7,82],[8,87],[9,90],[10,87],[11,93],[12,92],[13,82],[14,80],[15,79],[16,77],[17,72],[18,65],[19,73],[20,76],[21,77],[22,76],[23,76],[24,76],[25,75],[26,78],[27,73],[28,80],[29,77],[30,83]],"smooth":true,"showAllSymbol":true}]},{"series":[{"type":"line","data":[[1,84],[2,85],[3,81],[4,84],[5,83],[6,83],[7,88],[8,92],[9,92],[10,89],[11,82],[12,73],[13,81],[14,91],[15,80],[16,81],[17,82],[18,84],[19,87],[20,85],[21,74],[22,81],[23,82],[24,86],[25,85],[26,82],[27,86],[28,88],[29,86],[30,83],[31,81]],"smooth":true,"showAllSymbol":true}]},{"series":[{"type":"line","data":[[1,81],[2,81],[3,82],[4,86],[5,85],[6,87],[7,89],[8,90],[9,90],[10,92],[11,86],[12,86],[13,82],[14,80],[15,79],[16,77],[17,79],[18,76],[19,78],[20,78],[21,77],[22,72],[23,75],[24,79],[25,81],[26,86],[27,88],[28,97],[29,94],[30,96],[31,94]],"smooth":true,"showAllSymbol":true}]},{"series":[{"type":"line","data":[[1,91],[2,92],[3,93],[4,93],[5,87],[6,84],[7,80],[8,78],[9,75],[10,73],[11,81],[12,76],[13,77],[14,71],[15,71],[16,78],[17,67],[18,76],[19,68],[20,82],[21,64],[22,71],[23,81],[24,69],[25,63],[26,70],[27,77],[28,75],[29,76],[30,68]],"smooth":true,"showAllSymbol":true}]}]},"evals":["options.0.yAxis.0.axisLabel.formatter","options.0.tooltip.formatter"],"jsHooks":[]}</script>
</td>
</tr>
</table>
<p>Let’s wrap up all the features.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">g4 %&gt;%<span class="st"> </span><span class="kw">setY1Axis</span>(<span class="dt">series=</span><span class="st">&#39;Wind&#39;</span>, <span class="dt">axisLine=</span><span class="kw">list</span>(<span class="dt">lineStyle=</span><span class="kw">lineStyle</span>(<span class="dt">width=</span><span class="dv">0</span>)), 
                 <span class="dt">name=</span><span class="st">&#39;Wind&#39;</span>, <span class="dt">axisLabel=</span><span class="kw">list</span>(<span class="dt">formatter=</span><span class="st">&quot;%.1f mph&quot;</span>), <span class="dt">min=</span><span class="dv">0</span>) %&gt;%
<span class="st">    </span><span class="kw">setXAxis</span>(<span class="dt">splitLine=</span><span class="kw">list</span>(<span class="dt">show=</span><span class="ot">FALSE</span>), <span class="dt">axisLine=</span><span class="kw">list</span>(
        <span class="dt">lineStyle=</span><span class="kw">lineStyle</span>(<span class="dt">color=</span><span class="st">&#39;darkgray&#39;</span>))) %&gt;%<span class="st"> </span>
<span class="st">    </span><span class="kw">setYAxis</span>(<span class="dt">axisLine=</span><span class="kw">list</span>(<span class="dt">lineStyle=</span><span class="kw">lineStyle</span>(<span class="dt">width=</span><span class="dv">0</span>)), 
             <span class="dt">axisLabel=</span><span class="kw">list</span>(<span class="dt">formatter=</span><span class="st">&quot;%.1f °C&quot;</span>), <span class="dt">min=</span><span class="dv">0</span>, <span class="dt">name=</span><span class="st">&#39;Temp&#39;</span>) %&gt;%<span class="st"> </span>
<span class="st">    </span><span class="kw">setGrid</span>(<span class="dt">borderWidth=</span><span class="dv">0</span>)</code></pre></div>
<table>
<tr>
<td>
<div id="htmlwidget-510d54e6485b2e401431" style="width:400px;height:300px;" class="echarts html-widget"></div>
<script type="application/json" data-for="htmlwidget-510d54e6485b2e401431">{"x":{"timeline":{"type":"number","data":[5,6,7,8,9],"x":80,"x2":80},"options":[{"series":[{"name":"Temp","type":"line","data":[[1,67],[2,72],[3,74],[4,62],[5,56],[6,66],[7,65],[8,59],[9,61],[10,69],[11,74],[12,69],[13,66],[14,68],[15,58],[16,64],[17,66],[18,57],[19,68],[20,62],[21,59],[22,73],[23,61],[24,61],[25,57],[26,58],[27,57],[28,67],[29,81],[30,79],[31,76]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,7.4],[2,8],[3,12.6],[4,11.5],[5,14.3],[6,14.9],[7,8.6],[8,13.8],[9,20.1],[10,8.6],[11,6.9],[12,9.7],[13,9.2],[14,10.9],[15,13.2],[16,11.5],[17,12],[18,18.4],[19,11.5],[20,9.7],[21,9.7],[22,16.6],[23,9.7],[24,12],[25,16.6],[26,14.9],[27,8],[28,12],[29,14.9],[30,5.7],[31,7.4]],"showAllSymbol":true}],"legend":{"show":true,"data":["Temp","Wind"],"x":"left","y":"top","orient":"horizontal"},"yAxis":[{"type":"value","show":true,"position":"left","name":"value","nameLocation":"end","boundaryGap":[0,0],"scale":true,"axisLine":{"show":true,"onZero":false},"axisTick":{"show":false},"axisLabel":{"show":true},"splitLine":{"show":true},"splitArea":{"show":false}}],"xAxis":[{"type":"value","show":true,"position":"bottom","name":"Day","nameLocation":"end","boundaryGap":[0,0],"scale":true,"axisLine":{"show":true,"onZero":false},"axisTick":{"show":false},"axisLabel":{"show":true},"splitLine":{"show":true},"splitArea":{"show":false}}],"tooltip":{"show":true,"trigger":"axis","axisPointer":{"type":"line","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"formatter":"function (params) {\n       var i;\n       var j;\n       var text;\n       var text1;\n       var sName = \"\";\n       if (params.length > 1){\n            if (params[0].value.length >1) {\n                text1 = params[0].value[0];\n            } else {\n                text1 = params[0].value;\n            }\n            text = params[0].name;\n            if (params[0].seriesName) {\n                sName = params[0].seriesName;\n            }\n       } else {\n            if (params[0].value.length > 1) {\n                text1 = params[0].value[0];\n            } else {\n                text1 = params[0].value;\n            }\n            text = params[0].name;\n            if (params[0].seriesName) {\n                sName = params[0].seriesName;\n            }\n       }\n       if (params.length > 1){\n           text += \"<br/>\" + params[0].seriesName + \" :  \" + text1;\n           if (params[0].value.length > 1){\n                for (j = 1; j < params[0].value.length; j++){\n                    text += \", \" + params[0].value[j];\n                }\n           }\n           for (i = 1; i < params.length; i++) {\n                if (params[i].value.length > 1){\n                   text += \"<br/>\" + params[i].seriesName + \" :  \"\n                        + params[i].value[0];\n                   for (j = 1; j < params[i].value.length; j++){\n                        text += \", \" + params[i].value[j];\n                   }\n                } else {\n                   text += \"<br/>\" + params[i].seriesName + \" :  \"\n                        + params[i].value;\n                }\n           }\n       } else {\n           if (params[0].seriesName){\n               text += \"<br/>\" + params[0].seriesName + \" :  \" + text1;\n           } else {\n               text += \" :  \" + text1;\n           }\n           if (params[0].value.length > 1){\n                for (j = 1; j < params[0].value.length; j++){\n                    text += \", \" + params[0].value[j];\n                }\n           }\n       }\n       return text;\n    }","islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":true,"type":["line","bar","tiled","stack"]},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"center","orient":"vertical"}},{"series":[{"name":"Temp","type":"line","data":[[1,78],[2,74],[3,67],[4,84],[5,85],[6,79],[7,82],[8,87],[9,90],[10,87],[11,93],[12,92],[13,82],[14,80],[15,79],[16,77],[17,72],[18,65],[19,73],[20,76],[21,77],[22,76],[23,76],[24,76],[25,75],[26,78],[27,73],[28,80],[29,77],[30,83]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,8.6],[2,9.7],[3,16.1],[4,9.2],[5,8.6],[6,14.3],[7,9.7],[8,6.9],[9,13.8],[10,11.5],[11,10.9],[12,9.2],[13,8],[14,13.8],[15,11.5],[16,14.9],[17,20.7],[18,9.2],[19,11.5],[20,10.3],[21,6.3],[22,1.7],[23,4.6],[24,6.3],[25,8],[26,8],[27,10.3],[28,11.5],[29,14.9],[30,8]],"showAllSymbol":true}]},{"series":[{"name":"Temp","type":"line","data":[[1,84],[2,85],[3,81],[4,84],[5,83],[6,83],[7,88],[8,92],[9,92],[10,89],[11,82],[12,73],[13,81],[14,91],[15,80],[16,81],[17,82],[18,84],[19,87],[20,85],[21,74],[22,81],[23,82],[24,86],[25,85],[26,82],[27,86],[28,88],[29,86],[30,83],[31,81]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,4.1],[2,9.2],[3,9.2],[4,10.9],[5,4.6],[6,10.9],[7,5.1],[8,6.3],[9,5.7],[10,7.4],[11,8.6],[12,14.3],[13,14.9],[14,14.9],[15,14.3],[16,6.9],[17,10.3],[18,6.3],[19,5.1],[20,11.5],[21,6.9],[22,9.7],[23,11.5],[24,8.6],[25,8],[26,8.6],[27,12],[28,7.4],[29,7.4],[30,7.4],[31,9.2]],"showAllSymbol":true}]},{"series":[{"name":"Temp","type":"line","data":[[1,81],[2,81],[3,82],[4,86],[5,85],[6,87],[7,89],[8,90],[9,90],[10,92],[11,86],[12,86],[13,82],[14,80],[15,79],[16,77],[17,79],[18,76],[19,78],[20,78],[21,77],[22,72],[23,75],[24,79],[25,81],[26,86],[27,88],[28,97],[29,94],[30,96],[31,94]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,6.9],[2,13.8],[3,7.4],[4,6.9],[5,7.4],[6,4.6],[7,4],[8,10.3],[9,8],[10,8.6],[11,11.5],[12,11.5],[13,11.5],[14,9.7],[15,11.5],[16,10.3],[17,6.3],[18,7.4],[19,10.9],[20,10.3],[21,15.5],[22,14.3],[23,12.6],[24,9.7],[25,3.4],[26,8],[27,5.7],[28,9.7],[29,2.3],[30,6.3],[31,6.3]],"showAllSymbol":true}]},{"series":[{"name":"Temp","type":"line","data":[[1,91],[2,92],[3,93],[4,93],[5,87],[6,84],[7,80],[8,78],[9,75],[10,73],[11,81],[12,76],[13,77],[14,71],[15,71],[16,78],[17,67],[18,76],[19,68],[20,82],[21,64],[22,71],[23,81],[24,69],[25,63],[26,70],[27,77],[28,75],[29,76],[30,68]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,6.9],[2,5.1],[3,2.8],[4,4.6],[5,7.4],[6,15.5],[7,10.9],[8,10.3],[9,10.9],[10,9.7],[11,14.9],[12,15.5],[13,6.3],[14,10.9],[15,11.5],[16,6.9],[17,13.8],[18,10.3],[19,10.3],[20,8],[21,12.6],[22,9.2],[23,10.3],[24,10.3],[25,16.6],[26,6.9],[27,13.2],[28,14.3],[29,8],[30,11.5]],"showAllSymbol":true}]}]},"evals":["options.0.tooltip.formatter"],"jsHooks":[]}</script>
</td>
<td>
<div id="htmlwidget-c47b8a260d691ae4895e" style="width:400px;height:300px;" class="echarts html-widget"></div>
<script type="application/json" data-for="htmlwidget-c47b8a260d691ae4895e">{"x":{"timeline":{"type":"number","data":[5,6,7,8,9],"x":80,"x2":80},"options":[{"series":[{"name":"Temp","type":"line","data":[[1,67],[2,72],[3,74],[4,62],[5,56],[6,66],[7,65],[8,59],[9,61],[10,69],[11,74],[12,69],[13,66],[14,68],[15,58],[16,64],[17,66],[18,57],[19,68],[20,62],[21,59],[22,73],[23,61],[24,61],[25,57],[26,58],[27,57],[28,67],[29,81],[30,79],[31,76]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,7.4],[2,8],[3,12.6],[4,11.5],[5,14.3],[6,14.9],[7,8.6],[8,13.8],[9,20.1],[10,8.6],[11,6.9],[12,9.7],[13,9.2],[14,10.9],[15,13.2],[16,11.5],[17,12],[18,18.4],[19,11.5],[20,9.7],[21,9.7],[22,16.6],[23,9.7],[24,12],[25,16.6],[26,14.9],[27,8],[28,12],[29,14.9],[30,5.7],[31,7.4]],"showAllSymbol":true,"yAxisIndex":1}],"legend":{"show":true,"data":["Temp","Wind"],"x":"left","y":"top","orient":"horizontal"},"yAxis":[{"type":"value","show":true,"position":"left","name":"Temp","nameLocation":"end","boundaryGap":[0,0],"scale":true,"axisLine":{"show":true,"onZero":false,"lineStyle":{"width":0}},"axisTick":{"show":false},"axisLabel":{"show":true,"formatter":"function(x){return '' + x.toFixed(1) + ' °C';}"},"splitLine":{"show":true},"splitArea":{"show":false},"min":0},{"type":"value","show":true,"position":"right","name":"Wind","nameLocation":"end","boundaryGap":[0,0],"min":0,"scale":true,"axisLine":{"lineStyle":{"width":0}},"axisTick":{"show":false},"axisLabel":{"formatter":"function(x){return '' + x.toFixed(1) + ' mph';}"},"splitLine":{"show":true},"splitArea":{"show":false}}],"xAxis":[{"type":"value","show":true,"position":"bottom","name":"Day","nameLocation":"end","boundaryGap":[0,0],"scale":true,"axisLine":{"show":true,"onZero":false,"lineStyle":{"color":"darkgray"}},"axisTick":{"show":false},"axisLabel":{"show":true},"splitLine":{"show":false},"splitArea":{"show":false}}],"tooltip":{"show":true,"trigger":"axis","axisPointer":{"type":"line","crossStyle":{"type":"dashed"},"lineStyle":{"type":"solid","width":1},"shadowStyle":{"color":"rgba(150,150,150,0.3)","width":"auto","type":"default"}},"textStyle":{"color":"#fff"},"formatter":"function (params) {\n       var i;\n       var j;\n       var text;\n       var text1;\n       var sName = \"\";\n       if (params.length > 1){\n            if (params[0].value.length >1) {\n                text1 = params[0].value[0];\n            } else {\n                text1 = params[0].value;\n            }\n            text = params[0].name;\n            if (params[0].seriesName) {\n                sName = params[0].seriesName;\n            }\n       } else {\n            if (params[0].value.length > 1) {\n                text1 = params[0].value[0];\n            } else {\n                text1 = params[0].value;\n            }\n            text = params[0].name;\n            if (params[0].seriesName) {\n                sName = params[0].seriesName;\n            }\n       }\n       if (params.length > 1){\n           text += \"<br/>\" + params[0].seriesName + \" :  \" + text1;\n           if (params[0].value.length > 1){\n                for (j = 1; j < params[0].value.length; j++){\n                    text += \", \" + params[0].value[j];\n                }\n           }\n           for (i = 1; i < params.length; i++) {\n                if (params[i].value.length > 1){\n                   text += \"<br/>\" + params[i].seriesName + \" :  \"\n                        + params[i].value[0];\n                   for (j = 1; j < params[i].value.length; j++){\n                        text += \", \" + params[i].value[j];\n                   }\n                } else {\n                   text += \"<br/>\" + params[i].seriesName + \" :  \"\n                        + params[i].value;\n                }\n           }\n       } else {\n           if (params[0].seriesName){\n               text += \"<br/>\" + params[0].seriesName + \" :  \" + text1;\n           } else {\n               text += \" :  \" + text1;\n           }\n           if (params[0].value.length > 1){\n                for (j = 1; j < params[0].value.length; j++){\n                    text += \", \" + params[0].value[j];\n                }\n           }\n       }\n       return text;\n    }","islandFormatter":"{a} < br/>{b} : {c}","enterable":false,"showDelay":20,"hideDelay":100,"transitionDuration":0.4,"backgroundColor":"rgba(0,0,0,0.7)","borderColor":"#333","borderWidth":0,"borderRadius":4},"toolbox":{"show":true,"feature":{"mark":{"show":true},"dataZoom":{"show":true},"dataView":{"show":true,"readOnly":false},"magicType":{"show":true,"type":["line","bar","tiled","stack"]},"restore":{"show":true},"saveAsImage":{"show":true}},"x":"right","y":"center","orient":"vertical"},"grid":{"borderWidth":0}},{"series":[{"name":"Temp","type":"line","data":[[1,78],[2,74],[3,67],[4,84],[5,85],[6,79],[7,82],[8,87],[9,90],[10,87],[11,93],[12,92],[13,82],[14,80],[15,79],[16,77],[17,72],[18,65],[19,73],[20,76],[21,77],[22,76],[23,76],[24,76],[25,75],[26,78],[27,73],[28,80],[29,77],[30,83]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,8.6],[2,9.7],[3,16.1],[4,9.2],[5,8.6],[6,14.3],[7,9.7],[8,6.9],[9,13.8],[10,11.5],[11,10.9],[12,9.2],[13,8],[14,13.8],[15,11.5],[16,14.9],[17,20.7],[18,9.2],[19,11.5],[20,10.3],[21,6.3],[22,1.7],[23,4.6],[24,6.3],[25,8],[26,8],[27,10.3],[28,11.5],[29,14.9],[30,8]],"showAllSymbol":true}]},{"series":[{"name":"Temp","type":"line","data":[[1,84],[2,85],[3,81],[4,84],[5,83],[6,83],[7,88],[8,92],[9,92],[10,89],[11,82],[12,73],[13,81],[14,91],[15,80],[16,81],[17,82],[18,84],[19,87],[20,85],[21,74],[22,81],[23,82],[24,86],[25,85],[26,82],[27,86],[28,88],[29,86],[30,83],[31,81]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,4.1],[2,9.2],[3,9.2],[4,10.9],[5,4.6],[6,10.9],[7,5.1],[8,6.3],[9,5.7],[10,7.4],[11,8.6],[12,14.3],[13,14.9],[14,14.9],[15,14.3],[16,6.9],[17,10.3],[18,6.3],[19,5.1],[20,11.5],[21,6.9],[22,9.7],[23,11.5],[24,8.6],[25,8],[26,8.6],[27,12],[28,7.4],[29,7.4],[30,7.4],[31,9.2]],"showAllSymbol":true}]},{"series":[{"name":"Temp","type":"line","data":[[1,81],[2,81],[3,82],[4,86],[5,85],[6,87],[7,89],[8,90],[9,90],[10,92],[11,86],[12,86],[13,82],[14,80],[15,79],[16,77],[17,79],[18,76],[19,78],[20,78],[21,77],[22,72],[23,75],[24,79],[25,81],[26,86],[27,88],[28,97],[29,94],[30,96],[31,94]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,6.9],[2,13.8],[3,7.4],[4,6.9],[5,7.4],[6,4.6],[7,4],[8,10.3],[9,8],[10,8.6],[11,11.5],[12,11.5],[13,11.5],[14,9.7],[15,11.5],[16,10.3],[17,6.3],[18,7.4],[19,10.9],[20,10.3],[21,15.5],[22,14.3],[23,12.6],[24,9.7],[25,3.4],[26,8],[27,5.7],[28,9.7],[29,2.3],[30,6.3],[31,6.3]],"showAllSymbol":true}]},{"series":[{"name":"Temp","type":"line","data":[[1,91],[2,92],[3,93],[4,93],[5,87],[6,84],[7,80],[8,78],[9,75],[10,73],[11,81],[12,76],[13,77],[14,71],[15,71],[16,78],[17,67],[18,76],[19,68],[20,82],[21,64],[22,71],[23,81],[24,69],[25,63],[26,70],[27,77],[28,75],[29,76],[30,68]],"smooth":true,"showAllSymbol":true},{"name":"Wind","type":"line","data":[[1,6.9],[2,5.1],[3,2.8],[4,4.6],[5,7.4],[6,15.5],[7,10.9],[8,10.3],[9,10.9],[10,9.7],[11,14.9],[12,15.5],[13,6.3],[14,10.9],[15,11.5],[16,6.9],[17,13.8],[18,10.3],[19,10.3],[20,8],[21,12.6],[22,9.2],[23,10.3],[24,10.3],[25,16.6],[26,6.9],[27,13.2],[28,14.3],[29,8],[30,11.5]],"showAllSymbol":true}]}]},"evals":["options.0.yAxis.0.axisLabel.formatter","options.0.yAxis.1.axisLabel.formatter","options.0.tooltip.formatter"],"jsHooks":[]}</script>
</td>
</tr>
</table>
</div>
</div>
<div id="references" class="section level1">
<h1><span class="header-section-number">4</span> References</h1>
<p><a href="http://echarts.baidu.com/echarts2/doc/option.html#tooltip-line1~xAxis-i" class="uri">http://echarts.baidu.com/echarts2/doc/option.html#tooltip-line1~xAxis-i</a></p>
<p><a href="http://echarts.baidu.com/echarts2/doc/option.html#tooltip-line1~yAxis-i" class="uri">http://echarts.baidu.com/echarts2/doc/option.html#tooltip-line1~yAxis-i</a></p>
</div>

<script type="text/javascript">
window.onload = function() {
  var i, fig = 1, caps = document.getElementsByClassName('caption');
  for (i = 0; i < caps.length; i++) {
    var cap = caps[i];
    if (cap.parentElement.className !== 'figure' || cap.nodeName !== 'P')
      continue;
    cap.innerHTML = '<span>Figure ' + fig + ':</span> ' + cap.innerHTML;
    fig++;
  }
  fig = 1;
  caps = document.getElementsByTagName('caption');
  for (i = 0; i < caps.length; i++) {
    var cap = caps[i];
    if (cap.parentElement.nodeName !== 'TABLE') continue;
    cap.innerHTML = '<span>Table ' + fig + ':</span> ' + cap.innerHTML;
    fig++;
  }
}
</script>



</div>

<script>

// add bootstrap table styles to pandoc tables
function bootstrapStylePandocTables() {
  $('tr.header').parent('thead').parent('table').addClass('table table-condensed');
}
$(document).ready(function () {
  bootstrapStylePandocTables();
});


</script>

<!-- dynamically load mathjax for compatibility with self-contained -->
<script>
  (function () {
    var script = document.createElement("script");
    script.type = "text/javascript";
    script.src  = "https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
    document.getElementsByTagName("head")[0].appendChild(script);
  })();
</script>

</body>
</html>
